package com.hsteach.web.controller.activity.sdk;

import com.hsteach.common.annotation.Anonymous;
import com.hsteach.common.core.controller.BaseController;
import com.hsteach.common.core.page.TableDataInfo;
import com.hsteach.service.activity.ActivitiesService;
import com.hsteach.web.controller.activity.sdk.dto.ListActivitiesSdkDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 活动列表Controller
 * 
 * @author ruoyi
 * @date 2023-07-07
 */
@Api(value = "活动外部接口", tags = "活动外部接口")
@RestController
@RequestMapping("/activity")
public class ActivitiesSdkController extends BaseController
{
    @Autowired
    private ActivitiesService activitiesService;

    /**
     * 查询活动列表
     */
    @ApiOperation("查询活动列表")
    @Anonymous
    @PostMapping("/listFive")
    public TableDataInfo list(HttpServletRequest request, @RequestBody ListActivitiesSdkDto dto)
    {
//        String token = request.getHeader("token");
//        String Accesstoken = request.getHeader("Accesstoken");
//        String orgCode = request.getHeader("orgCode");
//        if (StringUtils.isEmpty(token)) {
//            token = Accesstoken;
//        }
        return activitiesService.listFive(dto);
    }

}
